package com.zjitc.config;


import com.zjitc.p1.config.JavaConfiguration2;
import com.zjitc.p1.obj.User;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * Created by lenovo on 2018/3/14.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:spring-configuration1.xml"})
//@ContextConfiguration(classes = {JavaConfiguration2.class})
public class XmlConfiguration {
    @Autowired
    private User user;

    @Test
    public void testGetTeacher(){
        Assert.assertNotNull(user.getTeacher());
    }
}
